package com.kgc.chapter01.vars

object TestThree {
  def main(args: Array[String]): Unit = {
    val decorator = new Decorator("[", "]")
    println(apply(decorator.layout, 7))
  }

  def apply(f: Int => String, v: Int) = f(v)

}

class Decorator(left: String, right: String) {
  def layout(x: Int)= left + x.toString() + right
}
